home *** CD-ROM | disk | FTP | other *** search
- /*=====[ The TesSeRact(TM) CXL User Interface Development System ]======*
- | Copyright (c) 1987-1990, Innovative Data Concepts. All Rights Reserved
- |
- | This Library is part of IDC's TesSeRact Development Tools product
- | line. For information about other IDC products, call 1-215-884-3373.
- *----------------------------------------------------------------------*
- | <TCXLdos.h> : Definition and prototypes for internal TCXL MS-DOS and
- | iApx86 interface functions.
- *----------------------------------------------------------------------*
- | PGS : $Id: tcxldos.h 5.51 90/10/01 00:00:00 MLM Release Locker: MLM $
- | $Log: tcxldos.h $
- | Revision 5.51 90/10/01 00:00:00 MLM
- | TCXL 5.51
- |
- *======================================================================*/
- #ifndef _TCXLdos_
- # define _TCXLdos_ 1 /* only once! */
- # ifndef _TCXLdef_
- # include <TCXLdef.h>
- # endif
-
- #define FA_RDO 0x01 /* read only attribute */
- #define FA_HID 0x02 /* hidden */
- #define FA_SYS 0x04 /* system */
- #define FA_VOL 0x08 /* volume label */
- #define FA_DIR 0x10 /* directory */
- #define FA_ARC 0x20 /* archive */
- #define FA_DEV 0x40 /* device *UNDOC* */
-
- /*------------------[ Data objects and access macros ]------------------*/
-
- TYP struct Ffb FfbT, *FfbP;
- struct Ffb /* findfirst/findnext DTA */
- { BytT fdos[21];
- BytT fatr;
- WrdT ftim;
- WrdT fdat;
- LngT fsiz;
- ChrT fnam[13];
- };
- #define FfbDos(f) ((f).fdos) /* DOS-reserved */
- #define FfbAtr(f) ((f).fatr) /* file attribute */
- #define FfbRdo(f) (0 != ((f).fatr & FA_RDO)) /* read-only */
- #define FfbHid(f) (0 != ((f).fatr & FA_HID)) /* hidden */
- #define FfbSys(f) (0 != ((f).fatr & FA_SYS)) /* system */
- #define FfbVol(f) (0 != ((f).fatr & FA_VOL)) /* volume */
- #define FfbDir(f) (0 != ((f).fatr & FA_DIR)) /* directory */
- #define FfbArc(f) (0 != ((f).fatr & FA_ARC)) /* archive */
- #define FfbDev(f) (0 != ((f).fatr & FA_DEV)) /* device */
- #define FfbTim(f) ((f).ftim) /* packed time */
- #define FfbDat(f) ((f).fdat) /* packed date */
- #define FfbSiz(f) ((f).fsiz) /* file size */
- #define FfbNam(f) ((f).fnam) /* file name */
- #define FfbDot(f) ((f).fnam[0]=='.') /* '.' or '..' */
- #define FfbPar(f) (FfbDot(f) && ((f).fnam[1] == '.')) /* parent dir */
-
- /*------------------------[ Function prototypes ]-----------------------*/
-
- #ifdef __cplusplus /* no mangling, please */
- extern "C" {
- #endif
- /*- MS-DOS -------------*/
- IntT PAS _ChgDir(ChrP p); /* change directory */
- IntT PAS _ChgDrv(IntT d); /* change current drive */
- IntT PAS _FndFst(ChrP p, FfbP f, IntT a); /* find first file */
- IntT PAS _FndNxt(FfbP f); /* find next file */
- VOID PAS _GetDir(IntT d, ChrP p); /* get current dir */
- IntT PAS _GetDrv(NOARG); /* get current drive */
- /*- iApx86 -------------*/
- IntT PAS _InpByt(WrdT p); /* input byte */
- WrdT PAS _InpWrd(WrdT p); /* input word */
- VOID PAS _IntDis(NOARG); /* disable interrupts */
- VOID PAS _IntEna(NOARG); /* enable interrupts */
- VOID PAS _OutByt(WrdT p, IntT b); /* output byte */
- VOID PAS _OutWrd(WrdT p, WrdT w); /* output word */
- #ifdef __cplusplus
- }
- #endif
- #endif /* _TCXLdos_ : End of TCXLdos.h */